package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TourismStatisticsMapper;
import com.ruoyi.system.domain.TourismStatistics;
import com.ruoyi.system.service.ITourismStatisticsService;

/**
 * 数据统计Service业务层处理
 * 
 * @author gqd
 * @date 2021-02-03
 */
@Service
public class TourismStatisticsServiceImpl implements ITourismStatisticsService 
{
    @Autowired
    private TourismStatisticsMapper tourismStatisticsMapper;

    /**
     * 查询数据统计
     * 
     * @param id 数据统计ID
     * @return 数据统计
     */
    @Override
    public TourismStatistics selectTourismStatisticsById(Long id)
    {
        return tourismStatisticsMapper.selectTourismStatisticsById(id);
    }

    /**
     * 查询数据统计列表
     * 
     * @param tourismStatistics 数据统计
     * @return 数据统计
     */
    @Override
    public List<TourismStatistics> selectTourismStatisticsList(TourismStatistics tourismStatistics)
    {
        return tourismStatisticsMapper.selectTourismStatisticsList(tourismStatistics);
    }

    /**
     * 新增数据统计
     * 
     * @param tourismStatistics 数据统计
     * @return 结果
     */
    @Override
    public int insertTourismStatistics(TourismStatistics tourismStatistics)
    {
        tourismStatistics.setCreateTime(DateUtils.getNowDate());
        return tourismStatisticsMapper.insertTourismStatistics(tourismStatistics);
    }

    /**
     * 修改数据统计
     * 
     * @param tourismStatistics 数据统计
     * @return 结果
     */
    @Override
    public int updateTourismStatistics(TourismStatistics tourismStatistics)
    {
        return tourismStatisticsMapper.updateTourismStatistics(tourismStatistics);
    }

    /**
     * 批量删除数据统计
     * 
     * @param ids 需要删除的数据统计ID
     * @return 结果
     */
    @Override
    public int deleteTourismStatisticsByIds(Long[] ids)
    {
        return tourismStatisticsMapper.deleteTourismStatisticsByIds(ids);
    }

    /**
     * 删除数据统计信息
     * 
     * @param id 数据统计ID
     * @return 结果
     */
    @Override
    public int deleteTourismStatisticsById(Long id)
    {
        return tourismStatisticsMapper.deleteTourismStatisticsById(id);
    }
}
